import { ComponentProps, Hook, VueComponent } from "vue3-oop"
import { NDivider } from 'naive-ui';
import DividerProps from './DividerProps'
import styles from './DividerView.module.scss'
import { WidgetNode } from '../../../types'

interface IProps {
  widgetNode: WidgetNode
}
export default class DividerView extends VueComponent<IProps> {
  static defaultProps: ComponentProps<IProps> = {
    widgetNode: {}
  }

  constructor() {
    super();
  }

  render(){
    const { widgetNode } = this.props;
    const widgetProps = widgetNode.widgetProps as DividerProps;

    return(
      <NDivider
        class={[styles.divider_view]}
      >{widgetProps.widgetLabel}</NDivider>
    )
  }
}